<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js"></script>
	</head>

	<body ng-app="myapp" ng-controller="myctro">
		<table width="200px" border="1px">
			<tr>
				<td>序号</td>
				<td>编号</td>
				<td>商品名</td>
				<td>价格</td>

			</tr>

			<tr ng-repeat="product in products">
				<td>{{$index+1}}</td>
				<td>{{product.id}}</td>
				<td>{{product.name}}</td>
				<td>{{product.price}}</td>

			</tr>

		</table>
	</body>
	<script type="text/javascript">
		var myapp = angular.module("myapp", []);
		myapp.controller("myctro", [
			"$scope",
			function($scope) {
				$scope.products = [{
					id: 1001,
					name: "电视机",
					price: 200
				}, {
					id: 1002,
					name: "电视机",
					price: 300
				}];
			}
		])
	</script>

</html>